<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>分配销售政策</title>
<link rel="stylesheet" type="text/css" href="../../css/core/main.css"/>
<link rel="stylesheet" type="text/css" href="../../css/biz/table.css"/>
<link rel="stylesheet" type="text/css" href="../../css/biz/form.css"/>
<link rel="stylesheet" type="text/css" href="../../css/biz/tab.css"/>
<script type="text/javascript" src="../../js/jquery/jquery.js"></script>
<script type="text/javascript" src="../../js/core/Tooltip/tooltip.js"></script>
<script type="text/javascript">
	$(function(){
		/*表单提交*/
		$("#btn1").click(function(){
			var number=	/^[0-9]\d*$/;
			if($("#moneys").val()==''){
				show_err_msg('价格还没填呢！');
			}else if(!number.test($('#moneys').val())){
				show_err_msg('请输入正整数！');
			}else if($("#discounts").val()==''){
				show_err_msg('会员折扣还没填呢！');
			}else if(!number.test($('#discounts').val())){
				show_err_msg('请输入正整数！');
			}else{
				show_msg('设置成功咯！正在为您跳转...','ticket_list.html');	
			}
		});
		$("#btn2").click(function(){
			show_msg('设置成功咯！正在为您跳转...','ticket_list.html');
		});
		/*tab切换*/
		$("#itab1").click(function(){
			$("#tab1").show();
			$("#tab2").hide();
			$("#btn1").show();
			$("#btn2").hide();
			$(this).addClass('selected');
			$("#itab2").removeClass('selected');
		});
		$("#itab2").click(function(){
			$("#tab1").hide()
			$("#tab2").show();
			$("#btn1").hide();
			$("#btn2").show();
			$(this).addClass('selected');
			$("#itab1").removeClass('selected');
		});
		
		$("#dialog-link").click(function(){
			$("#dialog").show();
		});
		$("#conserve").click(function(){
			var number=	/^[0-9]\d*$/;
			if($("#name").val()==''){
				show_err_msg('销售政策名称还没填呢！');
			}else if($("#number").val()==''){
				show_err_msg('生效数量还没填呢！');
			}else if(!number.test($('#number').val())){
				show_err_msg('请输入正整数！');
			}else if($("#limit").val()==''){
				show_err_msg('限制名额还没填呢！');
			}else if(!number.test($('#limit').val())){
				show_err_msg('请输入正整数！');
			}else if($("#money").val()==''){
				show_err_msg('价格还没填呢！');
			}else if(!number.test($('#money').val())){
				show_err_msg('请输入正整数！');
			}else if($("#discount").val()==''){
				show_err_msg('会员折扣还没填呢！');
			}else if(!number.test($('#discount').val())){
				show_err_msg('请输入正整数！');
			}else{
				show_msg('设置成功咯！正在为您跳转...','');	
				$("#dialog").hide();
			}
			
		});
		$("#back").click(function(){
			$("#dialog").hide();
		});
	});
</script>
</head>

<body>
	<div class="place-bg">
    	<div class="place-left"></div>
    	<div class="place-right">
            <ul>
            	<li>位置：</li>
                <li><a href="#">首页</a></li>
                <li><a href="#">剧目管理</a></li>
                <li><a href="#">演出剧场管理</a></li>
                <li><a href="#">场次管理</a></li>
                <li><a href="#">区位管理</a></li>
                <li><a href="#">分配销售政策</a></li>
            </ul>
        </div>
    </div>
    <div class="formtitle"><span>分配销售政策</span></div>
    <form target="rightFrame" id="jsForm">
    	<ul class="forminfo">
        	<li>
                <label for="name">区位名称</label>
                <div>
                <input type="text" class="dfinput disabled" id="name" name="name" disabled="disabled"/>
                </div>
         	</li>
            <li id="usual">
            	
            	<div class="itab">
		            
	                <span id="itab1" class="selected">默认模板</span> 
	                <span id="itab2">自定义</span> 
		            
		        </div> 
            </li>
            <div id="tab1">
	            <li>
	                <label for="polocy">销售政策<font class='red'>*</font></label>
	                <div>
	                <select name="polocy" id="polocy" class="dfselect">
		            	<option>1</option>
		            	<option>2</option>
		            	<option>3</option>
		            </select>
	                </div>
	            </li>
	            <li>
	                <label for="moneys">价格<font class='red'>*</font></label>
	                <div>
	                <input type="text" class="dfinput" id="moneys" name="moneys" onfocus="style.backgroundColor='#f8dd8b'" onblur="style.backgroundColor='#FFFFFF'"/>
	                </div>
	            </li>
	            <li>
	                <label for="discounts">会员折扣(%)<font class='red'>*</font></label>
	                <div>
	                <input type="text" class="dfinput" id="discounts" name="discounts" onfocus="style.backgroundColor='#f8dd8b'" onblur="style.backgroundColor='#FFFFFF'"/>
	                </div>
	            </li>
	            <li>
	                <label>状态<font class='red'>*</font></label>
	                <cite>
	                    <input name="state" type="radio" checked="checked" id="yes" />&nbsp;启用&nbsp;&nbsp;&nbsp;&nbsp;
	                    <input name="state" type="radio" id="no" />&nbsp;禁用
	                </cite>
	            </li>
            </div>
            <div id="tab2" style="display: none;">
            
			
				<div class="search">
			        <span>&nbsp;</span> 
			        <input type="button" class="add_tool tool_left" value="创建销售政策" id="dialog-link"/>
			    </div>
			    <div id="dialog" style="display: none;">
				    <form  id="jsForms" >
				    	<ul class="forminfo  forminfo_width">
				        	<li>
				                <label for="name">销售政策名称<font class='red'>*</font></label>
				                <div>
				                <input type="text" class="dfinput" id="name" name="name"onfocus="style.backgroundColor='#fbd713'" onblur="style.backgroundColor='#FFFFFF'"/>
				                </div>
				            </li>
				            <li>
				                <label for="number">生效数量<font class='red'>*</font></label>
				                <div>
				                <input type="text" class="dfinput" id="number" name="number" onfocus="style.backgroundColor='#f8dd8b'" onblur="style.backgroundColor='#FFFFFF'"/>
				                </div>
				            </li>
				            <li>
				                <label for="limit">限制名额<font class='red'>*</font></label>
				                <div>
				                <input type="text" class="dfinput" id="limit" name="limit"  onfocus="style.backgroundColor='#fbd713'" onblur="style.backgroundColor='#FFFFFF'"/>
				                </div>
				            </li>
				            <li>
				                <label for="payment">限定支付方式<font class='red'>*</font></label>
				                <div>
				                <select name="payment" id="payment" class="dfselect">
					            	<option>1</option>
					            	<option>2</option>
					            	<option>3</option>
					            </select>
				                </div>
				            </li>
				            <li>
				                <label for="money">价格<font class='red'>*</font></label>
				                <div>
				                <input type="text" class="dfinput" id="money" name="money" onfocus="style.backgroundColor='#f8dd8b'" onblur="style.backgroundColor='#FFFFFF'"/>
				                </div>
				            </li>
				            <li>
				                <label for="discount">会员折扣(%)<font class='red'>*</font></label>
				                <div>
				                <input type="text" class="dfinput" id="discount" name="discount" onfocus="style.backgroundColor='#f8dd8b'" onblur="style.backgroundColor='#FFFFFF'"/>
				                </div>
				            </li>
				            <li>
				                <label>普通可用<font class='red'>*</font></label>
				                <cite>
				                    <input name="cash" type="radio" checked="checked" id="cash_yes" />&nbsp;启用&nbsp;&nbsp;&nbsp;&nbsp;
				                    <input name="cash" type="radio" id="cash_no" />&nbsp;禁用
				                </cite>
				            </li>
				            <li>
				                <label>文惠卡可用<font class='red'>*</font></label>
				                <cite>
				                    <input name="whcard" type="radio" checked="checked" id="whcard_yes" />&nbsp;启用&nbsp;&nbsp;&nbsp;&nbsp;
				                    <input name="whcard" type="radio" id="whcard_no" />&nbsp;禁用
				                </cite>
				            </li>
				            <li>
				                <label>状态<font class='red'>*</font></label>
				                <cite>
				                    <input name="state" type="radio" checked="checked" id="yes" />&nbsp;启用&nbsp;&nbsp;&nbsp;&nbsp;
				                    <input name="state" type="radio" id="no" />&nbsp;禁用
				                </cite>
				            </li>
				            <li>
				                <label for="textarea">描述</label>
				                <div>
				                <textarea name="textarea" class="textinput" id="textarea" onfocus="style.backgroundColor='#f8dd8b'" onblur="style.backgroundColor='#FFFFFF'"></textarea>
				                </div>
				            </li>
				            <li>
				                <label>&nbsp;</label>
				                <div>
				                <input  type="button" class="btn formbtn" id="conserve" value="确认保存"/>
				    			<input type="button" class="btn formbtn" id="back" value="取消"/>
				                </div>
				            </li>
				        </ul>
				    </form>
				</div> 
			    <div class="table_box tablelist">
			    	<table width="100%">
			            <tr>
			                <th width="30%">名称</th>
			                <th width="15%">生效数量</th>
			                <th width="15%">价格</th>
			                <th width="40%">操作</th>
			            </tr>
			        </table>
			        <table width="100%">
			            <tr>
			                <td width="30%">1</td>
			                <td width="15%">2</td>
			                <td width="15%">1</td>
			                <td width="40%">
			                	<input type="button" class="edit_tool" value="编辑" />             
			                    <input type="button" class="forbidden_tool" value="禁用" />
			                    <input type="button" class="open_tool" value="启用" />
			                </td>
			            </tr>  
			        </table>
			    </div>

            </div>
            <li>
                <label>&nbsp;</label>
                <div>
                <input type="button" class="btn" id="btn1" value="提交" />
                <input type="button" class="btn" id="btn2" value="提交" style="display: none;" />
                <a href="ticket_list.html" class="btn_back">返回</a>
                </div>
            </li>
        </ul>
    </form>

    
</body>
</html>
